package com.zzx.project.service.impl;

import com.zzx.project.dao.LmDao;
import com.zzx.project.entity.Leavingmessage;
import com.zzx.project.service.LmService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LmServiceImpl implements LmService { //留言Service实现类

    @Autowired
    LmDao lmDao;

    @Override
    public List<Leavingmessage> getMessagesById(int uid) {
        return lmDao.getMessagesById(uid);
    }

    @Override
    public int addMessage(Leavingmessage leavingmessage) {
        return lmDao.addMessage(leavingmessage);
    }

    @Override
    public int getMessageCount() {
        return lmDao.getMessageCount();
    }
}
